package edu.zut.cs.software.cms.module.teacher.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import edu.zut.cs.software.cms.base.domain.BaseEntity;
/*
 *  @author 15869
 */

@Entity
@Table(name = "T_TEACHER")
public class Teacher extends BaseEntity<Long> {

	private static final long serialVersionUID = -2411978175041541798L;
	/**
	 * teacher's number
	 */
	@Column
	String code;
	/**
	 * teacher's name
	 */
	@Column
	String name;
	/**
	 * male or female
	 */
	@Column
	String gender;
	/**
	 * teacher teach course
	 */
	@Column
	String course;
	/**
	 * teacher's class
	 */
	@Column
	String grade;
	
	@ManyToOne
	@JoinColumn(name="TEACHER_COLLEGE_ID")
	College college;
	

	


	public College getCollege() {
		return college;
	}

	public void setCollege(College college) {
		this.college = college;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getGender() {
		return gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	public String getCourse() {
		return course;
	}

	public void setCourse(String course) {
		this.course = course;
	}

	public String getGrade() {
		return grade;
	}

	public void setGrade(String grade) {
		this.grade = grade;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
	}
}
